package adv_pre;

import java.util.*;

public class ArrayTest2 {

	public static void main(String[] args) {
		List list = new ArrayList();
		list.add("We");
		list.add("change");
		list.add("lives");
		list.add("java");
		list.add("change");
		list.add("future");
		list.add("java");
		System.out.println("size:" + list.size());
		Object o = list.get(4);
		System.out.println(o);
		System.out.println(list.get(5));
		System.out.println(">>>>>>>>>>...>");
		System.out.println(list);
		for (int i = 0; i < list.size(); i++) {
			System.out.print(i + 1);
			System.out.print(":");
			System.out.println(list.get(i));
		}
		System.out.println(">>>>>>>>>>>>>>.");
		for (Object ob : list) {
			System.out.println(ob);
		}
		System.out.println(">>>>>");
		System.out.println(list.contains("java"));
		// clear
	}

}
